package cn.gson.boot.model.dao;

import cn.gson.boot.model.pojos.Kehu;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

public interface HTDDKeHuDao extends CrudRepository<Kehu,Integer> {
    //查询客户
    @Query(nativeQuery = true,value = "select * from kehu")
    public List<Kehu> selectKehu();

    //根据客户名称来查客户id
    @Query(nativeQuery = true,value = "select * from kehu where k_name = ?1")
    public Kehu selectkhid(String khName);


   /* @Query("select k.kName from Kehu k")
    public List<Kehu> selectKehu();*/
}
